package com.vca.common.model.order;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.vca.common.model.user.UserAddress;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 订单购物详情表
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("vca_order_info")
@ApiModel(value="StoreOrderInfo对象", description="订单购物详情表")
public class StoreOrderInfo implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "商品ID")
    private Integer productId;

    @ApiModelProperty(value = "课程ID/套课ID/讲座ID/展览ID")
    private Long mainId;

    @ApiModelProperty(value = "订单类型:0-课程订单 1=套课订单 2=讲座订单 3=展览订单 4=商品订单")
    private Integer type;

    @ApiModelProperty(value = "排期ID")
    private Long schedulingId;

    @ApiModelProperty(value = "课程ID（如果是套课订单，则该字段不为空）")
    private Long taokeAboutCourseId;

    @ApiModelProperty(value = "购买东西的详细信息")
    private String info;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    @ApiModelProperty(value = "主订单号")
    private String orderNo;

    @ApiModelProperty(value = "子订单号")
    private String merOrderNo;

    @ApiModelProperty(value = "商品名称")
    private String name;

    @ApiModelProperty(value = "英文商品名称")
    private String nameEn;

    @ApiModelProperty(value = "规格属性id")
    private Integer attrValueId;

    @ApiModelProperty(value = "商品图片")
    private String image;

    @ApiModelProperty(value = "sku")
    private String sku;

    @ApiModelProperty(value = "英文sku")
    private String skuEn;

    @ApiModelProperty(value = "商品价格")
    private BigDecimal price;

    @ApiModelProperty(value = "购买数量")
    private Integer payNum;

    @ApiModelProperty(value = "重量")
    private BigDecimal weight;

    @ApiModelProperty(value = "体积")
    private BigDecimal volume;

    @ApiModelProperty(value = "语言")
    private String language;

    @ApiModelProperty(value = "英文语言")
    private String languageEn;

    @ApiModelProperty(value = "地址")
    private String address;

    @ApiModelProperty("地址")
    @TableField(exist = false)
    private UserAddress userAddress;

    @ApiModelProperty(value = "排期日期")
    private String schedulingDate;

    @ApiModelProperty(value = "排期当天开始时间")
    private String schedulingStartTime;

    @ApiModelProperty(value = "排期当天结束时间")
    private String schedulingEndTime;

    @ApiModelProperty(value = "订单状态（0：待发货；1：待收货【已预约（未参与）】；2：已收货，待评价【已参与】；3：已完成；）")
    private Integer status;

    @ApiModelProperty(value = "退款金额")
    private BigDecimal refundPrice;

    @ApiModelProperty(value = "退款状态  0 未退款 1 申请中 2 已退款 3 退款中  4 待退货 5 退货中 6 退款取消")
    private Integer refundStatus;

    @ApiModelProperty(value = "退款图片")
    private String refundReasonWapImg;

    @ApiModelProperty(value = "退款用户说明")
    private String refundReasonWapExplain;

    @ApiModelProperty(value = "前台退款原因")
    private String refundReasonWap;

    @ApiModelProperty(value = "不退款的理由")
    private String refundReason;

    @ApiModelProperty(value = "退款申请时间")
    private Date refundApplicationTime;

    @ApiModelProperty(value = "退款时间")
    private Date refundReasonTime;

    @ApiModelProperty(value = "购买人")
    private Integer buyer;

    @ApiModelProperty(value = "预约人")
    private Integer lecturer;

    @ApiModelProperty(value = "预约人电话")
    private String lecturerPhone;

    @ApiModelProperty(value = "预约人姓名")
    private String lecturerName;

    @ApiModelProperty(value = "预约人邮箱")
    private String lecturerEmail;

//    @ApiModelProperty(value = "1=为自己 2=赠送他人")
//    private Integer buyType;

    @ApiModelProperty(value = "是否领取 0=未领取  1=已领取")
    private Boolean isGet;

    @ApiModelProperty(value = "核销员id")
    private Integer writeOffClerkId;

    @ApiModelProperty(value = "核销时间")
    private Date writeOffTime;

    @ApiModelProperty(value = "银联退款订单号")
    private String umsRefundOrderId;

    @ApiModelProperty(value = "申请退款类型（预留）")
    private String applyRefundType;

    @ApiModelProperty(value = "红冲发票id 为空时未红冲")
    private Long creditNoteId;

    @ApiModelProperty(value = "单个明细实际支付金额（使用礼品卡的时候，存储折扣后的金额；不是用的时候，就是单个明细的总金额）")
    private BigDecimal payPrice;

    @ApiModelProperty(value = "通知 0=否 1=是")
    private Integer isTip;


}
